# -*- coding: utf-8 -*-
"""
Created on Sat Sep 12 16:41:00 2020

@author: wangshuo
"""

import matplotlib.pyplot as plt
import numpy as np

plt.axis([-10,150,100,-10])
plt.axis('on')
plt.grid(True)

p0=np.mat([0,0]).T
p1=np.mat([60,0]).T
p2=np.mat([60,60]).T

p_x=[p0[0,0],p1[0,0],p2[0,0],p0[0,0]]
p_y=[p0[1,0],p1[1,0],p2[1,0],p0[1,0]]

plt.plot(p_x,p_y,color='g')

#移动矩阵
t_move=np.mat([80,15]).T
p0_move=t_move+p0
p1_move=t_move+p1
p2_move=t_move+p2

p_x_move=[p0_move[0,0],p1_move[0,0],p2_move[0,0],p0_move[0,0]]
p_y_move=[p0_move[1,0],p1_move[1,0],p2_move[1,0],p0_move[1,0]]

plt.plot(p_x_move,p_y_move,color='r')

plt.show()



